/*
               File: MMUSU10
        Description: USUARIOS
             Author: GeneXus Java Generator version 8_0_9-040
       Generated on: 28 de Setiembre de 2010 13:4:13.42
       Program type: Callable routine
          Main DBMS: sqlserver
*/
import com.genexus.*;
import com.genexus.ui.*;
import com.genexus.db.*;
import com.genexus.distributed.*;
import com.genexus.uifactory.*;
import java.sql.*;

/* Client and Server side code */
public final class tmmusu10 extends GXTransaction
{
   public tmmusu10( int remoteHandle )
   {
      super( remoteHandle , new ModelContext( tmmusu10.class ), "" );
   }

   public tmmusu10( int remoteHandle ,
                    ModelContext context )
   {
      super( remoteHandle , context, "" );
   }

   public void init_no_key0y34( )
   {
      A433USUNOM = "" ;
      A434USUAUX = "" ;
      A435USUCLA = "" ;
      A436USUFCH = "" ;
      A437USUMAI = "" ;
      A438USUREG = "" ;
      A439USUREG = "" ;
      A440USUREG = "" ;
      A430GpUCod = "" ;
   }

   public void init_all0y34( )
   {
      A429USUCOD = "" ;
      K429USUCOD = A429USUCOD ;
      geteqAfterKey = (byte)(1) ;
      clear( ) ;
      init_no_key0y34( ) ;
   }

   public void samod_set_ins( )
   {
   }

   public void reset_caption_0y0( )
   {
   }

   /* Client side code */
   public void sa_startup( )
   {
      sa_startup_srv( ) ;
      disable_std_buttons( ) ;
      enable_disable( ) ;
   }

   protected String getObjectName( )
   {
      return "MMUSU10" ;
   }

   protected String getFrmTitle( )
   {
      return "USUARIOS" ;
   }

   protected GXMenuBar getMenuBar( )
   {
      return new GXMenuBarDefaultTRN(this) ;
   }

   protected int getFrmTop( )
   {
      return 0 ;
   }

   protected int getFrmLeft( )
   {
      return 0 ;
   }

   protected int getFrmWidth( )
   {
      return 710 ;
   }

   protected int getFrmHeight( )
   {
      return 302 ;
   }

   protected String getHelpId( )
   {
      return "HLP_TMMUSU10.htm";
   }

   protected int getFrmBackground( )
   {
      return UIFactory.getColor(15) ;
   }

   protected int getFrmForeground( )
   {
      return UIFactory.getColor(6) ;
   }

   protected boolean isMainProgram( )
   {
      return false;
   }

   protected boolean isModal( )
   {
      return false;
   }

   protected boolean hasDBAccess( )
   {
      return true ;
   }

   protected int getRefreshTimeout( )
   {
      return 0 ;
   }

   public boolean getRefreshTimeoutAlways( )
   {
      return true ;
   }

   protected boolean getPaintAfterStart( )
   {
      return true ;
   }

   protected int getBorderStyle( )
   {
      return 2 ;
   }

   protected boolean getMaxButton( )
   {
      return true ;
   }

   protected boolean getMinButton( )
   {
      return true ;
   }

   protected boolean getCtrlBox( )
   {
      return true ;
   }

   protected boolean getShowInTaskbar( )
   {
      return true ;
   }

   protected String getFormIcon( )
   {
      return "" ;
   }

   protected boolean getAutocenter( )
   {
      return true ;
   }

   public void execute( )
   {
      execute_int();
   }

   private void execute_int( )
   {
      start();
   }

   protected void screen( )
   {
      GXPanel1 = new GXPanel(this, 0 , 0 , 710 , 302 );
      this.setIBackground(UIFactory.getColor(15));
      this.setIForeground(UIFactory.getColor(6));
      GXPanel1.refreshFrame();
      edtUSUCOD = new GUIObjectString ( new GXEdit(10, "@!", UIFactory.getFont( "Courier New", 0, 9),126, 48, 80, 21, GXPanel1, false, ILabelConstants.BORDER_3D, GXTypeConstants.CHAR, false, true) , GXPanel1 , 126 , 48 , 80 , 21 , UIFactory.getColor(5) , UIFactory.getColor(8) , UIFactory.getFont( "Courier New", 0, 9) , true , "A429USUCOD" );
      ((GXEdit) edtUSUCOD.getGXComponent()).setAlignment(ILabelConstants.LEFT);
      edtUSUCOD.addFocusListener(this);
      edtUSUCOD.getGXComponent().setHelpId("HLP_TMMUSU10.htm");
      edtUSUNOM = new GUIObjectString ( new GXEdit(40, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", UIFactory.getFont( "Courier New", 0, 9),126, 72, 290, 21, GXPanel1, false, ILabelConstants.BORDER_3D, GXTypeConstants.CHAR, false, true) , GXPanel1 , 126 , 72 , 290 , 21 , UIFactory.getColor(5) , UIFactory.getColor(8) , UIFactory.getFont( "Courier New", 0, 9) , true , "A433USUNOM" );
      ((GXEdit) edtUSUNOM.getGXComponent()).setAlignment(ILabelConstants.LEFT);
      edtUSUNOM.addFocusListener(this);
      edtUSUNOM.getGXComponent().setHelpId("HLP_TMMUSU10.htm");
      edtUSUAUX = new GUIObjectString ( new GXEdit(64, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", UIFactory.getFont( "Courier New", 0, 9),126, 96, 458, 21, GXPanel1, false, ILabelConstants.BORDER_3D, GXTypeConstants.CHAR, false, true) , GXPanel1 , 126 , 96 , 458 , 21 , UIFactory.getColor(5) , UIFactory.getColor(8) , UIFactory.getFont( "Courier New", 0, 9) , true , "A434USUAUX" );
      ((GXEdit) edtUSUAUX.getGXComponent()).setAlignment(ILabelConstants.LEFT);
      edtUSUAUX.addFocusListener(this);
      edtUSUAUX.getGXComponent().setHelpId("HLP_TMMUSU10.htm");
      edtUSUCLA = new GUIObjectString ( new GXEdit(10, "XXXXXXXXXX", UIFactory.getFont( "Courier New", 0, 9),126, 120, 80, 21, GXPanel1, false, ILabelConstants.BORDER_3D, GXTypeConstants.CHAR, false, true) , GXPanel1 , 126 , 120 , 80 , 21 , UIFactory.getColor(5) , UIFactory.getColor(8) , UIFactory.getFont( "Courier New", 0, 9) , true , "A435USUCLA" );
      ((GXEdit) edtUSUCLA.getGXComponent()).setAlignment(ILabelConstants.LEFT);
      edtUSUCLA.addFocusListener(this);
      edtUSUCLA.getGXComponent().setHelpId("HLP_TMMUSU10.htm");
      edtUSUFCH = new GUIObjectString ( new GXEdit(8, "XXXXXXXX", UIFactory.getFont( "Courier New", 0, 9),126, 144, 66, 21, GXPanel1, false, ILabelConstants.BORDER_3D, GXTypeConstants.CHAR, false, true) , GXPanel1 , 126 , 144 , 66 , 21 , UIFactory.getColor(5) , UIFactory.getColor(8) , UIFactory.getFont( "Courier New", 0, 9) , true , "A436USUFCH" );
      ((GXEdit) edtUSUFCH.getGXComponent()).setAlignment(ILabelConstants.LEFT);
      edtUSUFCH.addFocusListener(this);
      edtUSUFCH.getGXComponent().setHelpId("HLP_TMMUSU10.htm");
      edtUSUMAIL = new GUIObjectString ( new GXEdit(40, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", UIFactory.getFont( "Courier New", 0, 9),126, 168, 290, 21, GXPanel1, false, ILabelConstants.BORDER_3D, GXTypeConstants.CHAR, false, true) , GXPanel1 , 126 , 168 , 290 , 21 , UIFactory.getColor(5) , UIFactory.getColor(8) , UIFactory.getFont( "Courier New", 0, 9) , true , "A437USUMAI" );
      ((GXEdit) edtUSUMAIL.getGXComponent()).setAlignment(ILabelConstants.LEFT);
      edtUSUMAIL.addFocusListener(this);
      edtUSUMAIL.getGXComponent().setHelpId("HLP_TMMUSU10.htm");
      edtUSUREGEST = new GUIObjectString ( new GXEdit(10, "XXXXXXXXXX", UIFactory.getFont( "Courier New", 0, 9),126, 192, 80, 21, GXPanel1, false, ILabelConstants.BORDER_3D, GXTypeConstants.CHAR, false, true) , GXPanel1 , 126 , 192 , 80 , 21 , UIFactory.getColor(5) , UIFactory.getColor(8) , UIFactory.getFont( "Courier New", 0, 9) , true , "A438USUREG" );
      ((GXEdit) edtUSUREGEST.getGXComponent()).setAlignment(ILabelConstants.LEFT);
      edtUSUREGEST.addFocusListener(this);
      edtUSUREGEST.getGXComponent().setHelpId("HLP_TMMUSU10.htm");
      edtUSUREGFCH = new GUIObjectString ( new GXEdit(8, "XXXXXXXX", UIFactory.getFont( "Courier New", 0, 9),126, 216, 66, 21, GXPanel1, false, ILabelConstants.BORDER_3D, GXTypeConstants.CHAR, false, true) , GXPanel1 , 126 , 216 , 66 , 21 , UIFactory.getColor(5) , UIFactory.getColor(8) , UIFactory.getFont( "Courier New", 0, 9) , true , "A439USUREG" );
      ((GXEdit) edtUSUREGFCH.getGXComponent()).setAlignment(ILabelConstants.LEFT);
      edtUSUREGFCH.addFocusListener(this);
      edtUSUREGFCH.getGXComponent().setHelpId("HLP_TMMUSU10.htm");
      edtUSUREGUSU = new GUIObjectString ( new GXEdit(10, "XXXXXXXXXX", UIFactory.getFont( "Courier New", 0, 9),126, 240, 80, 21, GXPanel1, false, ILabelConstants.BORDER_3D, GXTypeConstants.CHAR, false, true) , GXPanel1 , 126 , 240 , 80 , 21 , UIFactory.getColor(5) , UIFactory.getColor(8) , UIFactory.getFont( "Courier New", 0, 9) , true , "A440USUREG" );
      ((GXEdit) edtUSUREGUSU.getGXComponent()).setAlignment(ILabelConstants.LEFT);
      edtUSUREGUSU.addFocusListener(this);
      edtUSUREGUSU.getGXComponent().setHelpId("HLP_TMMUSU10.htm");
      edtGpUCod = new GUIObjectString ( new GXEdit(3, "999", UIFactory.getFont( "Courier New", 0, 9),126, 264, 31, 21, GXPanel1, false, ILabelConstants.BORDER_3D, GXTypeConstants.CHAR, false, true) , GXPanel1 , 126 , 264 , 31 , 21 , UIFactory.getColor(5) , UIFactory.getColor(8) , UIFactory.getFont( "Courier New", 0, 9) , true , "A430GpUCod" );
      ((GXEdit) edtGpUCod.getGXComponent()).setAlignment(ILabelConstants.LEFT);
      edtGpUCod.addFocusListener(this);
      edtGpUCod.getGXComponent().setHelpId("HLP_TMMUSU10.htm");
      bttBtn_first = UIFactory.getGXButton( GXPanel1 , "|<" ,  8 ,  2 ,  26 ,  24 , UIFactory.getFont( "MS Shell Dlg", 0, 8) );
      bttBtn_first.setTooltip("|<");
      bttBtn_first.addActionListener(this);
      bttBtn_first.setFiresEvents(false);
      bttBtn_previous = UIFactory.getGXButton( GXPanel1 , "<" ,  34 ,  2 ,  26 ,  24 , UIFactory.getFont( "MS Shell Dlg", 0, 8) );
      bttBtn_previous.setTooltip("<");
      bttBtn_previous.addActionListener(this);
      bttBtn_previous.setFiresEvents(false);
      bttBtn_next = UIFactory.getGXButton( GXPanel1 , ">" ,  60 ,  2 ,  26 ,  24 , UIFactory.getFont( "MS Shell Dlg", 0, 8) );
      bttBtn_next.setTooltip(">");
      bttBtn_next.addActionListener(this);
      bttBtn_next.setFiresEvents(false);
      bttBtn_last = UIFactory.getGXButton( GXPanel1 , ">|" ,  86 ,  2 ,  26 ,  24 , UIFactory.getFont( "MS Shell Dlg", 0, 8) );
      bttBtn_last.setTooltip(">|");
      bttBtn_last.addActionListener(this);
      bttBtn_last.setFiresEvents(false);
      bttBtn_select = UIFactory.getGXButton( GXPanel1 , "Seleccionar" ,  115 ,  2 ,  89 ,  24 , UIFactory.getFont( "MS Shell Dlg", 0, 8) );
      bttBtn_select.setTooltip("Seleccionar");
      bttBtn_select.addActionListener(this);
      bttBtn_select.setFiresEvents(false);
      bttBtn_enter = UIFactory.getGXButton( GXPanel1 , "Confirmar" ,  602 ,  48 ,  89 ,  23 , UIFactory.getFont( "MS Shell Dlg", 0, 8) );
      bttBtn_enter.setTooltip("Confirmar");
      bttBtn_enter.addActionListener(this);
      bttBtn_cancel = UIFactory.getGXButton( GXPanel1 , "Cerrar" ,  602 ,  76 ,  89 ,  23 , UIFactory.getFont( "MS Shell Dlg", 0, 8) );
      bttBtn_cancel.setTooltip("Cerrar");
      bttBtn_cancel.addActionListener(this);
      bttBtn_cancel.setFiresEvents(false);
      bttBtn_delete = UIFactory.getGXButton( GXPanel1 , "Eliminar" ,  602 ,  104 ,  89 ,  23 , UIFactory.getFont( "MS Shell Dlg", 0, 8) );
      bttBtn_delete.setTooltip("Eliminar");
      bttBtn_delete.addActionListener(this);
      bttBtn_help = UIFactory.getGXButton( GXPanel1 , "Ayuda" ,  602 ,  142 ,  89 ,  23 , UIFactory.getFont( "MS Shell Dlg", 0, 8) );
      bttBtn_help.setTooltip("Ayuda");
      bttBtn_help.addActionListener(this);
      lbllbl12 = UIFactory.getLabel(GXPanel1, "USUCOD", ILabelConstants.LEFT, Integer.MAX_VALUE, UIFactory.getColor(8), UIFactory.getFont( "MS Sans Serif", IFontConstants.BOLD, 8), false, ILabelConstants.BORDER_NONE , 21 , 48 , 53 , 13 );
      lbllbl14 = UIFactory.getLabel(GXPanel1, "USUNOM", ILabelConstants.LEFT, Integer.MAX_VALUE, UIFactory.getColor(8), UIFactory.getFont( "MS Sans Serif", IFontConstants.BOLD, 8), false, ILabelConstants.BORDER_NONE , 21 , 72 , 55 , 13 );
      lbllbl16 = UIFactory.getLabel(GXPanel1, "USUAUX", ILabelConstants.LEFT, Integer.MAX_VALUE, UIFactory.getColor(8), UIFactory.getFont( "MS Sans Serif", IFontConstants.BOLD, 8), false, ILabelConstants.BORDER_NONE , 21 , 96 , 52 , 13 );
      lbllbl18 = UIFactory.getLabel(GXPanel1, "USUCLA", ILabelConstants.LEFT, Integer.MAX_VALUE, UIFactory.getColor(8), UIFactory.getFont( "MS Sans Serif", IFontConstants.BOLD, 8), false, ILabelConstants.BORDER_NONE , 21 , 120 , 50 , 13 );
      lbllbl20 = UIFactory.getLabel(GXPanel1, "USUFCH", ILabelConstants.LEFT, Integer.MAX_VALUE, UIFactory.getColor(8), UIFactory.getFont( "MS Sans Serif", IFontConstants.BOLD, 8), false, ILabelConstants.BORDER_NONE , 21 , 144 , 51 , 13 );
      lbllbl22 = UIFactory.getLabel(GXPanel1, "USUMAIL", ILabelConstants.LEFT, Integer.MAX_VALUE, UIFactory.getColor(8), UIFactory.getFont( "MS Sans Serif", IFontConstants.BOLD, 8), false, ILabelConstants.BORDER_NONE , 21 , 168 , 56 , 13 );
      lbllbl24 = UIFactory.getLabel(GXPanel1, "USUREGEST", ILabelConstants.LEFT, Integer.MAX_VALUE, UIFactory.getColor(8), UIFactory.getFont( "MS Sans Serif", IFontConstants.BOLD, 8), false, ILabelConstants.BORDER_NONE , 21 , 192 , 77 , 13 );
      lbllbl26 = UIFactory.getLabel(GXPanel1, "USUREGFCH", ILabelConstants.LEFT, Integer.MAX_VALUE, UIFactory.getColor(8), UIFactory.getFont( "MS Sans Serif", IFontConstants.BOLD, 8), false, ILabelConstants.BORDER_NONE , 21 , 216 , 77 , 13 );
      lbllbl28 = UIFactory.getLabel(GXPanel1, "USUREGUSU", ILabelConstants.LEFT, Integer.MAX_VALUE, UIFactory.getColor(8), UIFactory.getFont( "MS Sans Serif", IFontConstants.BOLD, 8), false, ILabelConstants.BORDER_NONE , 21 , 240 , 79 , 13 );
      lbllbl30 = UIFactory.getLabel(GXPanel1, "Grupo Usuario", ILabelConstants.LEFT, Integer.MAX_VALUE, UIFactory.getColor(8), UIFactory.getFont( "MS Sans Serif", IFontConstants.BOLD, 8), false, ILabelConstants.BORDER_NONE , 21 , 264 , 82 , 13 );
      focusManager.setControlList(new IFocusableControl[] {
                edtUSUCOD ,
                edtUSUNOM ,
                edtUSUAUX ,
                edtUSUCLA ,
                edtUSUFCH ,
                edtUSUMAIL ,
                edtUSUREGEST ,
                edtUSUREGFCH ,
                edtUSUREGUSU ,
                edtGpUCod ,
                bttBtn_enter ,
                bttBtn_cancel ,
                bttBtn_delete ,
                bttBtn_help ,
                bttBtn_first ,
                bttBtn_previous ,
                bttBtn_next ,
                bttBtn_last ,
                bttBtn_select
      });
   }

   protected void setFocusFirst( )
   {
      setFocus(edtUSUCOD, true);
   }

   public void reloadDynamicLists( int id )
   {
   }

   public void clear( )
   {
      init_no_key0y34( ) ;
   }

   public void disable_std_buttons( )
   {
   }

   public void set_caption( )
   {
      if ( ( IsConfirmed == 1 ) && ( AnyError == 0 ) )
      {
         if ( ( GXutil.strcmp(Gx_mode, "DLT") == 0 ) )
         {
            context.msgStatus( localUtil.getMessages().getMessage("confdelete") );
         }
         else
         {
            context.msgStatus( localUtil.getMessages().getMessage("mustconfirm") );
         }
         bttBtn_enter.setCaption( localUtil.getMessages().getMessage("captionconfirm") );
         bttBtn_enter.setTooltip( localUtil.getMessages().getMessage("captionconfirm") );
      }
      else if ( ( GXutil.strcmp(Gx_mode, "INS") == 0 ) )
      {
         bttBtn_enter.setCaption( localUtil.getMessages().getMessage("captionadd") );
         bttBtn_enter.setTooltip( localUtil.getMessages().getMessage("captionadd") );
      }
      else if ( ( GXutil.strcmp(Gx_mode, "UPD") == 0 ) )
      {
         bttBtn_enter.setCaption( localUtil.getMessages().getMessage("captionupdate") );
         bttBtn_enter.setTooltip( localUtil.getMessages().getMessage("captionupdate") );
      }
      else if ( ( GXutil.strcmp(Gx_mode, "DLT") == 0 ) )
      {
         bttBtn_enter.setCaption( localUtil.getMessages().getMessage("captiondelete") );
         bttBtn_enter.setTooltip( localUtil.getMessages().getMessage("captiondelete") );
      }
      else
      {
      }
   }

   public void after_trn( )
   {
      if ( ( trnEnded == 1 ) )
      {
         trnEnded = 0 ;
         if (!cleanedUp) {
            sanomod( ) ;
            if ( (GXutil.strcmp(Gx_mode, "INS")==0) )
            {
               /* Clear variables for new insertion. */
               init_all0y34( ) ;
               sanomod( ) ;
               samod( ) ;
            }
         }
      }
   }

   protected boolean hasStatusBar( )
   {
      return true;
   }

   public void refreshArray( String array )
   {
   }

   protected void GXEnter( )
   {
      btn_enter( ) ;
      if (!cleanedUp) {
         VariablesToControls();
         set_caption( );
      }
   }

   protected void GXStart( )
   {
      sa_startup( ) ;
      VariablesToControls();
      /* Execute Start event if defined. */
   }

   protected void actionEventDispatch( Object eventSource )
   {
      lastAnyError = AnyError ;
      AnyError = 0;
      if ( bttBtn_cancel.isEventSource(eventSource) ) {
         if (canCleanup())
            cleanup();

         return;
      }
      if ( bttBtn_help.isEventSource(eventSource) ) {
         showHelp();
         return;
      }
      if ( bttBtn_first.isEventSource(eventSource) ) {
         if ( ( lastAnyError != 0 ) )
         {
            return;
         }
         btn_first( ) ;
         if (!cleanedUp) {
            VariablesToControls();
            set_caption( );
         }
         return;
      }
      if ( bttBtn_previous.isEventSource(eventSource) ) {
         if ( ( lastAnyError != 0 ) )
         {
            return;
         }
         btn_previous( ) ;
         if (!cleanedUp) {
            VariablesToControls();
            set_caption( );
         }
         return;
      }
      if ( bttBtn_next.isEventSource(eventSource) ) {
         if ( ( lastAnyError != 0 ) )
         {
            return;
         }
         btn_next( ) ;
         if (!cleanedUp) {
            VariablesToControls();
            set_caption( );
         }
         return;
      }
      if ( bttBtn_last.isEventSource(eventSource) ) {
         if ( ( lastAnyError != 0 ) )
         {
            return;
         }
         btn_last( ) ;
         if (!cleanedUp) {
            VariablesToControls();
            set_caption( );
         }
         return;
      }
      if ( bttBtn_select.isEventSource(eventSource) ) {
         if ( ( lastAnyError != 0 ) )
         {
            return;
         }
         btn_select( ) ;
         if (!cleanedUp) {
            VariablesToControls();
            set_caption( );
         }
         return;
      }
      if ( bttBtn_enter.isEventSource(eventSource) ) {
         if ( ( lastAnyError != 0 ) )
         {
            return;
         }
         btn_enter( ) ;
         if (!cleanedUp) {
            VariablesToControls();
            set_caption( );
         }
         return;
      }
      if ( bttBtn_delete.isEventSource(eventSource) ) {
         if ( ( lastAnyError != 0 ) )
         {
            return;
         }
         btn_delete( ) ;
         if (!cleanedUp) {
            VariablesToControls();
            set_caption( );
         }
         return;
      }
   }

   protected void setCurrentGXCursor( Object eventSource )
   {
      if ( edtUSUCOD.isEventSource(eventSource) ) {
         setGXCursor( edtUSUCOD.getGXCursor() );
         return;
      }
      if ( edtUSUNOM.isEventSource(eventSource) ) {
         setGXCursor( edtUSUNOM.getGXCursor() );
         return;
      }
      if ( edtUSUAUX.isEventSource(eventSource) ) {
         setGXCursor( edtUSUAUX.getGXCursor() );
         return;
      }
      if ( edtUSUCLA.isEventSource(eventSource) ) {
         setGXCursor( edtUSUCLA.getGXCursor() );
         return;
      }
      if ( edtUSUFCH.isEventSource(eventSource) ) {
         setGXCursor( edtUSUFCH.getGXCursor() );
         return;
      }
      if ( edtUSUMAIL.isEventSource(eventSource) ) {
         setGXCursor( edtUSUMAIL.getGXCursor() );
         return;
      }
      if ( edtUSUREGEST.isEventSource(eventSource) ) {
         setGXCursor( edtUSUREGEST.getGXCursor() );
         return;
      }
      if ( edtUSUREGFCH.isEventSource(eventSource) ) {
         setGXCursor( edtUSUREGFCH.getGXCursor() );
         return;
      }
      if ( edtUSUREGUSU.isEventSource(eventSource) ) {
         setGXCursor( edtUSUREGUSU.getGXCursor() );
         return;
      }
      if ( edtGpUCod.isEventSource(eventSource) ) {
         setGXCursor( edtGpUCod.getGXCursor() );
         return;
      }
   }

   protected void gotFocusEventDispatch( Object eventSource )
   {
   }

   protected void focusEventDispatch( Object eventSource )
   {
      AnyError = 0 ;
      if ( edtUSUCOD.isEventSource(eventSource) ) {
         valid_usucod ();
         return;
      }
      if ( edtGpUCod.isEventSource(eventSource) ) {
         valid_gpucod ();
         return;
      }
   }

   protected void updateAttributes( Object eventSource )
   {
      if ( edtUSUCOD.isEventSource(eventSource) ) {
         A429USUCOD = edtUSUCOD.getValue() ;
         return;
      }
      if ( edtUSUNOM.isEventSource(eventSource) ) {
         A433USUNOM = edtUSUNOM.getValue() ;
         return;
      }
      if ( edtUSUAUX.isEventSource(eventSource) ) {
         A434USUAUX = edtUSUAUX.getValue() ;
         return;
      }
      if ( edtUSUCLA.isEventSource(eventSource) ) {
         A435USUCLA = edtUSUCLA.getValue() ;
         return;
      }
      if ( edtUSUFCH.isEventSource(eventSource) ) {
         A436USUFCH = edtUSUFCH.getValue() ;
         return;
      }
      if ( edtUSUMAIL.isEventSource(eventSource) ) {
         A437USUMAI = edtUSUMAIL.getValue() ;
         return;
      }
      if ( edtUSUREGEST.isEventSource(eventSource) ) {
         A438USUREG = edtUSUREGEST.getValue() ;
         return;
      }
      if ( edtUSUREGFCH.isEventSource(eventSource) ) {
         A439USUREG = edtUSUREGFCH.getValue() ;
         return;
      }
      if ( edtUSUREGUSU.isEventSource(eventSource) ) {
         A440USUREG = edtUSUREGUSU.getValue() ;
         return;
      }
      if ( edtGpUCod.isEventSource(eventSource) ) {
         A430GpUCod = edtGpUCod.getValue() ;
         return;
      }
   }

   protected void itemEventDispatch( Object eventSource )
   {
   }

   public void mouseEventDispatch( Object eventSource ,
                                   int modifier )
   {
   }

   public boolean keyEventDispatch( Object eventSource ,
                                    int keyCode )
   {
      if (triggerEventEnter(eventSource, keyCode)) {
         AnyError = 0;
         btn_enter( ) ;
         if (!cleanedUp) {
            VariablesToControls();
            set_caption( );
         }
         return true ;
      }
      if (keyCode == getContext().getClientPreferences().getKEY_PROMPT()) {
         return keyPromptHandler(eventSource);
      }
      return false;
   }

   public boolean isKeyControl( Object eventSource )
   {
      if ( ( edtUSUCOD.isEventSource(eventSource) ) && ( ( GXutil.strcmp(A429USUCOD, edtUSUCOD.getValue()) != 0 ) ) )
      {
         return true;
      }
      return false;
   }

   public boolean isBodyControl( Object eventSource )
   {
      if ( ( edtUSUNOM.isEventSource(eventSource) ) && ( ( GXutil.strcmp(A433USUNOM, edtUSUNOM.getValue()) != 0 ) ) )
      {
         return true;
      }
      if ( ( edtUSUAUX.isEventSource(eventSource) ) && ( ( GXutil.strcmp(A434USUAUX, edtUSUAUX.getValue()) != 0 ) ) )
      {
         return true;
      }
      if ( ( edtUSUCLA.isEventSource(eventSource) ) && ( ( GXutil.strcmp(A435USUCLA, edtUSUCLA.getValue()) != 0 ) ) )
      {
         return true;
      }
      if ( ( edtUSUFCH.isEventSource(eventSource) ) && ( ( GXutil.strcmp(A436USUFCH, edtUSUFCH.getValue()) != 0 ) ) )
      {
         return true;
      }
      if ( ( edtUSUMAIL.isEventSource(eventSource) ) && ( ( GXutil.strcmp(A437USUMAI, edtUSUMAIL.getValue()) != 0 ) ) )
      {
         return true;
      }
      if ( ( edtUSUREGEST.isEventSource(eventSource) ) && ( ( GXutil.strcmp(A438USUREG, edtUSUREGEST.getValue()) != 0 ) ) )
      {
         return true;
      }
      if ( ( edtUSUREGFCH.isEventSource(eventSource) ) && ( ( GXutil.strcmp(A439USUREG, edtUSUREGFCH.getValue()) != 0 ) ) )
      {
         return true;
      }
      if ( ( edtUSUREGUSU.isEventSource(eventSource) ) && ( ( GXutil.strcmp(A440USUREG, edtUSUREGUSU.getValue()) != 0 ) ) )
      {
         return true;
      }
      if ( ( edtGpUCod.isEventSource(eventSource) ) && ( ( GXutil.strcmp(A430GpUCod, edtGpUCod.getValue()) != 0 ) ) )
      {
         return true;
      }
      return false;
   }

   public boolean menuActionPerformed( String action )
   {
      return false;
   }

   protected void resetCaption( )
   {
      reset_caption_0y0( ) ;
   }

   protected void setAddCaption( )
   {
      bttBtn_enter.setCaption( localUtil.getMessages().getMessage("captionadd") );
      bttBtn_enter.setTooltip( localUtil.getMessages().getMessage("captionadd") );
   }

   public IGXButton getCancelButton( )
   {
      return bttBtn_cancel ;
   }

   public IGXButton getConfirmButton( )
   {
      return bttBtn_enter ;
   }

   public IGXButton getDeleteButton( )
   {
      return bttBtn_delete ;
   }

   protected boolean keyPromptHandler( Object eventSource )
   {
      return false;
   }

   protected void VariablesToControls( )
   {
      edtUSUCOD.setValue( A429USUCOD );
      edtUSUNOM.setValue( A433USUNOM );
      edtUSUAUX.setValue( A434USUAUX );
      edtUSUCLA.setValue( A435USUCLA );
      edtUSUFCH.setValue( A436USUFCH );
      edtUSUMAIL.setValue( A437USUMAI );
      edtUSUREGEST.setValue( A438USUREG );
      edtUSUREGFCH.setValue( A439USUREG );
      edtUSUREGUSU.setValue( A440USUREG );
      edtGpUCod.setValue( A430GpUCod );
   }

   protected void ControlsToVariables( )
   {
      A429USUCOD = edtUSUCOD.getValue() ;
      A433USUNOM = edtUSUNOM.getValue() ;
      A434USUAUX = edtUSUAUX.getValue() ;
      A435USUCLA = edtUSUCLA.getValue() ;
      A436USUFCH = edtUSUFCH.getValue() ;
      A437USUMAI = edtUSUMAIL.getValue() ;
      A438USUREG = edtUSUREGEST.getValue() ;
      A439USUREG = edtUSUREGFCH.getValue() ;
      A440USUREG = edtUSUREGUSU.getValue() ;
      A430GpUCod = edtGpUCod.getValue() ;
   }

   protected void eventNoLevelContext( )
   {
      ControlsToVariables();
   }

   protected void eventLevelContext( )
   {
      ControlsToVariables();
   }

   protected void eventLevelResetContext( )
   {
   }

   protected void reloadGridRow( )
   {
   }

   public void valid_usucod( )
   {
      if ( ( GXutil.strcmp(A429USUCOD, K429USUCOD) != 0 ) || ( geteqAfterKey == 1 ) )
      {
         if ( ( AnyError == 0 ) )
         {
            K429USUCOD = A429USUCOD ;
            geteq_nomod( ) ;
            VariablesToControls();
         }
         if ( ( AnyError == 0 ) )
         {
            geteqAfterKey = 0 ;
         }
         else
         {
            geteqAfterKey = (byte)(1) ;
         }
      }
      IsConfirmed = 0 ;
      set_caption( ) ;
   }

   public void valid_gpucod( )
   {
      /* Using cursor T00342 */
      pr_default.execute(0, new Object[] {A430GpUCod});
      if ( (pr_default.getStatus(0) == 101) )
      {
         GXutil.msg( me(), localUtil.getMessages().getMessage("inex", new Object[] {"Grupo de Usuarios"}) );
         AnyError = (short)(1) ;
         setNextFocus( edtGpUCod );
         setFocusNext();
      }
      pr_default.close(0);
      reloadGridRow();
   }

   /* Server side code */
   /* Aggregate/select formulas */
   /* Vertical formulas */
   public void sa_startup_srv( )
   {
      if ( ( AnyError == 0 ) )
      {
         sanomod( ) ;
         Gx_mode = "INS" ;
         samod( ) ;
         if ( ( GXutil.strcmp(Gx_mode, "INS") == 0 ) )
         {
         }
      }
      set_caption( ) ;
      PreviousCaption = bttBtn_enter.getCaption() ;
   }

   public void zm0y34( int GX_JID )
   {
      if ( ( GX_JID == 1 ) || ( GX_JID == 0 ) )
      {
         if ( ( GXutil.strcmp(Gx_mode, "INS") != 0 ) )
         {
            Z433USUNOM = T00344_A433USUNOM[0] ;
            Z434USUAUX = T00344_A434USUAUX[0] ;
            Z435USUCLA = T00344_A435USUCLA[0] ;
            Z436USUFCH = T00344_A436USUFCH[0] ;
            Z437USUMAI = T00344_A437USUMAI[0] ;
            Z438USUREG = T00344_A438USUREG[0] ;
            Z439USUREG = T00344_A439USUREG[0] ;
            Z440USUREG = T00344_A440USUREG[0] ;
            Z430GpUCod = T00344_A430GpUCod[0] ;
         }
         else
         {
            Z433USUNOM = A433USUNOM ;
            Z434USUAUX = A434USUAUX ;
            Z435USUCLA = A435USUCLA ;
            Z436USUFCH = A436USUFCH ;
            Z437USUMAI = A437USUMAI ;
            Z438USUREG = A438USUREG ;
            Z439USUREG = A439USUREG ;
            Z440USUREG = A440USUREG ;
            Z430GpUCod = A430GpUCod ;
         }
      }
   }

   public void sanomod( )
   {
   }

   public void samod( )
   {
   }

   public void ld0y34( )
   {
   }

   public void checket_0y34( )
   {
      Gx_BScreen = (byte)(1) ;
      samod( ) ;
      Gx_BScreen = 0 ;
      /* Using cursor T00342 */
      pr_default.execute(0, new Object[] {A430GpUCod});
      if ( (pr_default.getStatus(0) == 101) )
      {
         pushError( localUtil.getMessages().getMessage("inex", new Object[] {"Grupo de Usuarios"}) );
         AnyError = (short)(1) ;
         setNextFocus( edtGpUCod );
      }
   }

   public void close_checket_0y34( )
   {
      pr_default.close(0);
   }

   public void enable_disable( )
   {
   }

   public void getkey_0y34( )
   {
      /* Using cursor T00345 */
      pr_default.execute(3, new Object[] {A429USUCOD});
      if ( (pr_default.getStatus(3) != 101) )
      {
         RcdFound34 = (short)(1) ;
      }
      else
      {
         RcdFound34 = 0 ;
      }
      pr_default.close(3);
   }

   public void geteq( )
   {
      /* Using cursor T00344 */
      pr_default.execute(2, new Object[] {A429USUCOD});
      if ( (pr_default.getStatus(2) != 101) )
      {
         zm0y34( 1) ;
         RcdFound34 = (short)(1) ;
         A429USUCOD = T00344_A429USUCOD[0] ;
         A433USUNOM = T00344_A433USUNOM[0] ;
         A434USUAUX = T00344_A434USUAUX[0] ;
         A435USUCLA = T00344_A435USUCLA[0] ;
         A436USUFCH = T00344_A436USUFCH[0] ;
         A437USUMAI = T00344_A437USUMAI[0] ;
         A438USUREG = T00344_A438USUREG[0] ;
         A439USUREG = T00344_A439USUREG[0] ;
         A440USUREG = T00344_A440USUREG[0] ;
         A430GpUCod = T00344_A430GpUCod[0] ;
         Z429USUCOD = A429USUCOD ;
         sMode34 = Gx_mode ;
         Gx_mode = "DSP" ;
         samod( ) ;
         ld0y34( ) ;
         Gx_mode = sMode34 ;
      }
      else
      {
         RcdFound34 = 0 ;
         init_no_key0y34( ) ;
         sMode34 = Gx_mode ;
         Gx_mode = "DSP" ;
         samod( ) ;
         Gx_mode = sMode34 ;
      }
      K429USUCOD = A429USUCOD ;
      pr_default.close(2);
   }

   public void geteq_nomod( )
   {
      getkey_0y34( ) ;
      if ( ( RcdFound34 == 0 ) )
      {
         Gx_mode = "INS" ;
      }
      else
      {
         Gx_mode = "UPD" ;
      }
      geteq( ) ;
   }

   public void move_next( )
   {
      RcdFound34 = 0 ;
      /* Using cursor T00346 */
      pr_default.execute(4, new Object[] {A429USUCOD});
      if ( (pr_default.getStatus(4) != 101) )
      {
         while ( (pr_default.getStatus(4) != 101) && ( ( GXutil.strcmp(T00346_A429USUCOD[0], A429USUCOD) < 0 ) ) )
         {
            pr_default.readNext(4);
         }
         if ( (pr_default.getStatus(4) != 101) && ( ( GXutil.strcmp(T00346_A429USUCOD[0], A429USUCOD) > 0 ) ) )
         {
            A429USUCOD = T00346_A429USUCOD[0] ;
            RcdFound34 = (short)(1) ;
         }
      }
      pr_default.close(4);
   }

   public void move_previous( )
   {
      RcdFound34 = 0 ;
      /* Using cursor T00347 */
      pr_default.execute(5, new Object[] {A429USUCOD});
      if ( (pr_default.getStatus(5) != 101) )
      {
         while ( (pr_default.getStatus(5) != 101) && ( ( GXutil.strcmp(T00347_A429USUCOD[0], A429USUCOD) > 0 ) ) )
         {
            pr_default.readNext(5);
         }
         if ( (pr_default.getStatus(5) != 101) && ( ( GXutil.strcmp(T00347_A429USUCOD[0], A429USUCOD) < 0 ) ) )
         {
            A429USUCOD = T00347_A429USUCOD[0] ;
            RcdFound34 = (short)(1) ;
         }
      }
      pr_default.close(5);
   }

   public void btn_enter( )
   {
      nKeyPressed = (byte)(1) ;
      getkey_0y34( ) ;
      if ( ( RcdFound34 == 1 ) )
      {
         if ( ( GXutil.strcmp(Gx_mode, "INS") == 0 ) )
         {
            pushError( localUtil.getMessages().getMessage("noupdate") );
            AnyError = (short)(1) ;
            setNextFocus( edtUSUCOD );
         }
         else if ( ( GXutil.strcmp(A429USUCOD, Z429USUCOD) != 0 ) )
         {
            A429USUCOD = Z429USUCOD ;
            edtUSUCOD.setValue(A429USUCOD);
            pushError( localUtil.getMessages().getMessage("getbeforeupd") );
            AnyError = (short)(1) ;
            setNextFocus( edtUSUCOD );
         }
         else
         {
            Gx_mode = "UPD" ;
            /* Update record */
            update_0y34( ) ;
            setNextFocus( edtUSUCOD );
         }
      }
      else
      {
         if ( ( GXutil.strcmp(A429USUCOD, Z429USUCOD) != 0 ) )
         {
            Gx_mode = "INS" ;
            /* Insert record */
            insert_0y34( ) ;
            setNextFocus( edtUSUCOD );
         }
         else
         {
            if ( ( GXutil.strcmp(Gx_mode, "UPD") == 0 ) )
            {
               pushError( localUtil.getMessages().getMessage("recdeleted") );
               AnyError = (short)(1) ;
               setNextFocus( edtUSUCOD );
            }
            else
            {
               Gx_mode = "INS" ;
               /* Insert record */
               insert_0y34( ) ;
               setNextFocus( edtUSUCOD );
            }
         }
      }
      handleErrors();
      after_trn( ) ;
      if ( ( sanomodError == 0 ) )
      {
         handleErrors();
      }
      setFocusNext();
      AnyError = 0 ;
      if	(loopOnce) cleanup();
   }

   public void btn_delete( )
   {
      if ( ( GXutil.strcmp(A429USUCOD, Z429USUCOD) != 0 ) )
      {
         A429USUCOD = Z429USUCOD ;
         edtUSUCOD.setValue(A429USUCOD);
         pushError( localUtil.getMessages().getMessage("getbeforedlt") );
         AnyError = (short)(1) ;
         setNextFocus( edtUSUCOD );
      }
      else
      {
         GXutil.confirm( me(), localUtil.getMessages().getMessage("deleinfo") , true );
         if ( GXutil.Confirmed )
         {
            delete( ) ;
            handleErrors();
            after_trn( ) ;
            setNextFocus( edtUSUCOD );
         }
      }
      if ( ( AnyError != 0 ) )
      {
         Gx_mode = "UPD" ;
      }
      geteq( ) ;
      if ( ( sanomodError == 0 ) )
      {
         handleErrors();
      }
      setFocusNext();
   }

   public void btn_get( )
   {
      nKeyPressed = (byte)(2) ;
      IsConfirmed = 0 ;
      geteq_nomod( ) ;
      if ( ( RcdFound34 == 0 ) )
      {
         pushError( localUtil.getMessages().getMessage("keynfound") );
         AnyError = (short)(1) ;
         keepFocus();
      }
      else
      {
         setNextFocus( edtUSUNOM );
      }
      if ( ( sanomodError == 0 ) )
      {
         handleErrors();
      }
      setFocusNext();
   }

   public void btn_first( )
   {
      nKeyPressed = (byte)(2) ;
      IsConfirmed = 0 ;
      scanstart_0y34( ) ;
      if ( ( RcdFound34 == 0 ) )
      {
         context.msgStatus( localUtil.getMessages().getMessage("norectobrow") );
      }
      else
      {
         Gx_mode = "UPD" ;
         setNextFocus( edtUSUNOM );
      }
      scanend_0y34( ) ;
      geteq( ) ;
      if ( ( sanomodError == 0 ) )
      {
         handleErrors();
      }
      setFocusNext();
   }

   public void btn_previous( )
   {
      nKeyPressed = (byte)(2) ;
      IsConfirmed = 0 ;
      move_previous( ) ;
      if ( ( RcdFound34 == 0 ) )
      {
         context.msgStatus( localUtil.getMessages().getMessage("norectobrow") );
      }
      else
      {
         Gx_mode = "UPD" ;
         setNextFocus( edtUSUNOM );
      }
      geteq( ) ;
      if ( ( sanomodError == 0 ) )
      {
         handleErrors();
      }
      setFocusNext();
   }

   public void btn_next( )
   {
      nKeyPressed = (byte)(2) ;
      IsConfirmed = 0 ;
      move_next( ) ;
      if ( ( RcdFound34 == 0 ) )
      {
         context.msgStatus( localUtil.getMessages().getMessage("norectobrow") );
      }
      else
      {
         Gx_mode = "UPD" ;
         setNextFocus( edtUSUNOM );
      }
      geteq( ) ;
      if ( ( sanomodError == 0 ) )
      {
         handleErrors();
      }
      setFocusNext();
   }

   public void btn_last( )
   {
      nKeyPressed = (byte)(2) ;
      IsConfirmed = 0 ;
      scanstart_0y34( ) ;
      if ( ( RcdFound34 == 0 ) )
      {
         context.msgStatus( localUtil.getMessages().getMessage("norectobrow") );
      }
      else
      {
         while ( ( RcdFound34 != 0 ) )
         {
            scannext_0y34( ) ;
         }
         Gx_mode = "UPD" ;
         setNextFocus( edtUSUNOM );
      }
      scanend_0y34( ) ;
      geteq( ) ;
      if ( ( sanomodError == 0 ) )
      {
         handleErrors();
      }
      setFocusNext();
   }

   public void btn_select( )
   {
      geteq_nomod( ) ;
   }

   public void chkps_0y34( )
   {
      if ( ( GXutil.strcmp(Gx_mode, "INS") != 0 ) )
      {
         /* Using cursor T00343 */
         pr_default.execute(1, new Object[] {A429USUCOD});
         if ( ! (pr_default.getStatus(1) != 103) )
         {
            pushError( localUtil.getMessages().getMessage("lock", new Object[] {"MMUSU10"}) );
            AnyError = (short)(1) ;
            keepFocus();
            return  ;
         }
         Gx_longc = false ;
         if ( (pr_default.getStatus(1) == 101) || ( GXutil.strcmp(Z433USUNOM, T00343_A433USUNOM[0]) != 0 ) || ( GXutil.strcmp(Z434USUAUX, T00343_A434USUAUX[0]) != 0 ) || ( GXutil.strcmp(Z435USUCLA, T00343_A435USUCLA[0]) != 0 ) || ( GXutil.strcmp(Z436USUFCH, T00343_A436USUFCH[0]) != 0 ) || ( GXutil.strcmp(Z437USUMAI, T00343_A437USUMAI[0]) != 0 ) )
         {
            Gx_longc = true ;
         }
         if ( Gx_longc || ( GXutil.strcmp(Z438USUREG, T00343_A438USUREG[0]) != 0 ) || ( GXutil.strcmp(Z439USUREG, T00343_A439USUREG[0]) != 0 ) || ( GXutil.strcmp(Z440USUREG, T00343_A440USUREG[0]) != 0 ) || ( GXutil.strcmp(Z430GpUCod, T00343_A430GpUCod[0]) != 0 ) )
         {
            pushError( localUtil.getMessages().getMessage("waschg", new Object[] {"MMUSU10"}) );
            AnyError = (short)(1) ;
            keepFocus();
            return  ;
         }
      }
   }

   public void insert_0y34( )
   {
      checket_0y34( ) ;
      if ( ( AnyError == 0 ) )
      {
         zm0y34( 0) ;
         chkps_0y34( ) ;
         if ( ( AnyError == 0 ) )
         {
            after_confirm_0y34( ) ;
            if ( ( AnyError == 0 ) )
            {
               /* Using cursor T00348 */
               pr_default.execute(6, new Object[] {A429USUCOD, A433USUNOM, A434USUAUX, A435USUCLA, A436USUFCH, A437USUMAI, A438USUREG, A439USUREG, A440USUREG, A430GpUCod});
               if ( (pr_default.getStatus(6) == 1) )
               {
                  pushError( localUtil.getMessages().getMessage("noupdate") );
                  AnyError = (short)(1) ;
                  keepFocus();
               }
               if ( ( AnyError == 0 ) )
               {
                  /* Start of After( Insert) rules */
                  /* End of After( Insert) rules */
                  if ( ( AnyError == 0 ) )
                  {
                     /* Save values for previous() function. */
                     context.msgStatus( localUtil.getMessages().getMessage("sucadded") );
                     reset_caption_0y0( ) ;
                  }
               }
               else
               {
                  pushError( localUtil.getMessages().getMessage("unexp") );
                  AnyError = (short)(1) ;
                  keepFocus();
               }
            }
         }
         else
         {
            ld0y34( ) ;
         }
         endlvl_0y34( ) ;
      }
      close_checket_0y34( ) ;
   }

   public void update_0y34( )
   {
      checket_0y34( ) ;
      if ( ( AnyError == 0 ) )
      {
         chkps_0y34( ) ;
         if ( ( AnyError == 0 ) )
         {
            after_confirm_0y34( ) ;
            if ( ( AnyError == 0 ) )
            {
               /* Using cursor T00349 */
               pr_default.execute(7, new Object[] {A433USUNOM, A434USUAUX, A435USUCLA, A436USUFCH, A437USUMAI, A438USUREG, A439USUREG, A440USUREG, A430GpUCod, A429USUCOD});
               if ( ( AnyError == 0 ) )
               {
                  /* Start of After( update) rules */
                  /* End of After( update) rules */
                  if ( ( AnyError == 0 ) )
                  {
                     geteq( ) ;
                     context.msgStatus( localUtil.getMessages().getMessage("sucupdated") );
                     reset_caption_0y0( ) ;
                  }
               }
               else
               {
                  pushError( localUtil.getMessages().getMessage("unexp") );
                  AnyError = (short)(1) ;
                  keepFocus();
               }
            }
         }
         endlvl_0y34( ) ;
      }
      close_checket_0y34( ) ;
   }

   public void delete( )
   {
      Gx_mode = "DLT" ;
      chkps_0y34( ) ;
      if ( ( AnyError == 0 ) )
      {
         delete_controls0y34( ) ;
         /* No cascading delete specified. */
         after_confirm_0y34( ) ;
         if ( ( AnyError == 0 ) )
         {
            /* Using cursor T003410 */
            pr_default.execute(8, new Object[] {A429USUCOD});
            if ( ( AnyError == 0 ) )
            {
               /* Start of After( delete) rules */
               /* End of After( delete) rules */
               if ( ( AnyError == 0 ) )
               {
                  move_next( ) ;
                  if ( ( RcdFound34 == 0 ) )
                  {
                     init_all0y34( ) ;
                     Gx_mode = "INS" ;
                  }
                  else
                  {
                     geteq( ) ;
                     Gx_mode = "UPD" ;
                  }
                  context.msgStatus( localUtil.getMessages().getMessage("sucdeleted") );
                  reset_caption_0y0( ) ;
               }
            }
            else
            {
               pushError( localUtil.getMessages().getMessage("unexp") );
               AnyError = (short)(1) ;
               keepFocus();
            }
         }
      }
      sMode34 = Gx_mode ;
      Gx_mode = "DLT" ;
      endlvl_0y34( ) ;
      Gx_mode = sMode34 ;
   }

   public void delete_controls0y34( )
   {
      samod( ) ;
      /* No delete mode formulas found. */
      /* The base table is not referenced outside the transaction. */
   }

   public void endlvl_0y34( )
   {
      if ( ( GXutil.strcmp(Gx_mode, "INS") != 0 ) )
      {
         pr_default.close(1);
      }
      if ( ( AnyError == 0 ) && ( sanomodError == 0 ) )
      {
         Application.commit(context, remoteHandle, "DEFAULT", "tmmusu10");
         /* After transaction rules */
         /* Execute 'After Trn' event if defined. */
         trnEnded = 1 ;
      }
      else
      {
         Application.rollback(context, remoteHandle, "DEFAULT", "tmmusu10");
      }
   }

   public void scanstart_0y34( )
   {
      /* Using cursor T003411 */
      pr_default.execute(9);
      RcdFound34 = 0 ;
      if ( (pr_default.getStatus(9) != 101) )
      {
         RcdFound34 = (short)(1) ;
         A429USUCOD = T003411_A429USUCOD[0] ;
      }
   }

   public void scannext_0y34( )
   {
      pr_default.readNext(9);
      RcdFound34 = 0 ;
      if ( (pr_default.getStatus(9) != 101) )
      {
         RcdFound34 = (short)(1) ;
         A429USUCOD = T003411_A429USUCOD[0] ;
      }
   }

   public void scanend_0y34( )
   {
      pr_default.close(9);
   }

   public void after_confirm_0y34( )
   {
      /* After confirm rules */
   }

   public void confirm_0y0( )
   {
      if ( ( GXutil.strcmp(Gx_mode, "DLT") == 0 ) )
      {
         delete_controls0y34( ) ;
      }
      else
      {
         checket_0y34( ) ;
         close_checket_0y34( ) ;
      }
      if ( ( AnyError == 0 ) && ( sanomodError == 0 ) )
      {
         PreviousCaption = bttBtn_enter.getCaption() ;
         PreviousTooltip = bttBtn_enter.getTooltip() ;
         IsConfirmed = (short)(1) ;
      }
   }

   protected void cleanup( )
   {
      if (cleanedUp) {
         return  ;
      }
      if (!exitExecuted) {
         exitExecuted = true;
         GXExit();
      }
      super.cleanup();
      Application.cleanup(context, this, remoteHandle);
   }

   public void initialize( )
   {
      IsConfirmed = 0 ;
      trnEnded = 0 ;
      nKeyPressed = 0 ;
      PreviousTooltip = "" ;
      PreviousCaption = "" ;
      A433USUNOM = "" ;
      A434USUAUX = "" ;
      A435USUCLA = "" ;
      A436USUFCH = "" ;
      A437USUMAI = "" ;
      A438USUREG = "" ;
      A439USUREG = "" ;
      A440USUREG = "" ;
      A430GpUCod = "" ;
      A429USUCOD = "" ;
      K429USUCOD = "" ;
      lastAnyError = 0 ;
      T00342_A430GpUCod = new String[] {""} ;
      Z433USUNOM = "" ;
      Z434USUAUX = "" ;
      Z435USUCLA = "" ;
      Z436USUFCH = "" ;
      Z437USUMAI = "" ;
      Z438USUREG = "" ;
      Z439USUREG = "" ;
      Z440USUREG = "" ;
      Z430GpUCod = "" ;
      Gx_longc = false ;
      GX_JID = 0 ;
      Gx_BScreen = 0 ;
      RcdFound34 = 0 ;
      T00345_A429USUCOD = new String[] {""} ;
      T00344_A429USUCOD = new String[] {""} ;
      T00344_A433USUNOM = new String[] {""} ;
      T00344_A434USUAUX = new String[] {""} ;
      T00344_A435USUCLA = new String[] {""} ;
      T00344_A436USUFCH = new String[] {""} ;
      T00344_A437USUMAI = new String[] {""} ;
      T00344_A438USUREG = new String[] {""} ;
      T00344_A439USUREG = new String[] {""} ;
      T00344_A440USUREG = new String[] {""} ;
      T00344_A430GpUCod = new String[] {""} ;
      Z429USUCOD = "" ;
      sMode34 = "" ;
      T00346_A429USUCOD = new String[] {""} ;
      T00347_A429USUCOD = new String[] {""} ;
      T00343_A429USUCOD = new String[] {""} ;
      T00343_A433USUNOM = new String[] {""} ;
      T00343_A434USUAUX = new String[] {""} ;
      T00343_A435USUCLA = new String[] {""} ;
      T00343_A436USUFCH = new String[] {""} ;
      T00343_A437USUMAI = new String[] {""} ;
      T00343_A438USUREG = new String[] {""} ;
      T00343_A439USUREG = new String[] {""} ;
      T00343_A440USUREG = new String[] {""} ;
      T00343_A430GpUCod = new String[] {""} ;
      T003411_A429USUCOD = new String[] {""} ;
      pr_default = new DataStoreProvider(context, remoteHandle, new tmmusu10__default(),
         new Object[] {
             new Object[] {
            T00342_A430GpUCod
            }
            , new Object[] {
            T00343_A429USUCOD, T00343_A433USUNOM, T00343_A434USUAUX, T00343_A435USUCLA, T00343_A436USUFCH, T00343_A437USUMAI, T00343_A438USUREG, T00343_A439USUREG, T00343_A440USUREG, T00343_A430GpUCod
            }
            , new Object[] {
            T00344_A429USUCOD, T00344_A433USUNOM, T00344_A434USUAUX, T00344_A435USUCLA, T00344_A436USUFCH, T00344_A437USUMAI, T00344_A438USUREG, T00344_A439USUREG, T00344_A440USUREG, T00344_A430GpUCod
            }
            , new Object[] {
            T00345_A429USUCOD
            }
            , new Object[] {
            T00346_A429USUCOD
            }
            , new Object[] {
            T00347_A429USUCOD
            }
            , new Object[] {
            }
            , new Object[] {
            }
            , new Object[] {
            }
            , new Object[] {
            T003411_A429USUCOD
            }
         }
      );
      reloadDynamicLists(0);
   }

   protected byte geteqAfterKey= 1 ;
   protected byte nKeyPressed ;
   protected byte Gx_BScreen ;
   protected short IsConfirmed ;
   protected short RcdFound34 ;
   protected int trnEnded ;
   protected int lastAnyError ;
   protected int GX_JID ;
   protected String PreviousTooltip ;
   protected String PreviousCaption ;
   protected String A433USUNOM ;
   protected String A434USUAUX ;
   protected String A435USUCLA ;
   protected String A436USUFCH ;
   protected String A437USUMAI ;
   protected String A438USUREG ;
   protected String A439USUREG ;
   protected String A440USUREG ;
   protected String A430GpUCod ;
   protected String A429USUCOD ;
   protected String K429USUCOD ;
   protected String Z433USUNOM ;
   protected String Z434USUAUX ;
   protected String Z435USUCLA ;
   protected String Z436USUFCH ;
   protected String Z437USUMAI ;
   protected String Z438USUREG ;
   protected String Z439USUREG ;
   protected String Z440USUREG ;
   protected String Z430GpUCod ;
   protected String Z429USUCOD ;
   protected String sMode34 ;
   protected boolean Gx_longc ;
   protected GXPanel GXPanel1 ;
   protected GUIObjectString edtUSUCOD ;
   protected GUIObjectString edtUSUNOM ;
   protected GUIObjectString edtUSUAUX ;
   protected GUIObjectString edtUSUCLA ;
   protected GUIObjectString edtUSUFCH ;
   protected GUIObjectString edtUSUMAIL ;
   protected GUIObjectString edtUSUREGEST ;
   protected GUIObjectString edtUSUREGFCH ;
   protected GUIObjectString edtUSUREGUSU ;
   protected GUIObjectString edtGpUCod ;
   protected IGXButton bttBtn_first ;
   protected IGXButton bttBtn_previous ;
   protected IGXButton bttBtn_next ;
   protected IGXButton bttBtn_last ;
   protected IGXButton bttBtn_select ;
   protected IGXButton bttBtn_enter ;
   protected IGXButton bttBtn_cancel ;
   protected IGXButton bttBtn_delete ;
   protected IGXButton bttBtn_help ;
   protected ILabel lbllbl12 ;
   protected ILabel lbllbl14 ;
   protected ILabel lbllbl16 ;
   protected ILabel lbllbl18 ;
   protected ILabel lbllbl20 ;
   protected ILabel lbllbl22 ;
   protected ILabel lbllbl24 ;
   protected ILabel lbllbl26 ;
   protected ILabel lbllbl28 ;
   protected ILabel lbllbl30 ;
   protected IDataStoreProvider pr_default ;
   protected String[] T00342_A430GpUCod ;
   protected String[] T00345_A429USUCOD ;
   protected String[] T00344_A429USUCOD ;
   protected String[] T00344_A433USUNOM ;
   protected String[] T00344_A434USUAUX ;
   protected String[] T00344_A435USUCLA ;
   protected String[] T00344_A436USUFCH ;
   protected String[] T00344_A437USUMAI ;
   protected String[] T00344_A438USUREG ;
   protected String[] T00344_A439USUREG ;
   protected String[] T00344_A440USUREG ;
   protected String[] T00344_A430GpUCod ;
   protected String[] T00346_A429USUCOD ;
   protected String[] T00347_A429USUCOD ;
   protected String[] T00343_A429USUCOD ;
   protected String[] T00343_A433USUNOM ;
   protected String[] T00343_A434USUAUX ;
   protected String[] T00343_A435USUCLA ;
   protected String[] T00343_A436USUFCH ;
   protected String[] T00343_A437USUMAI ;
   protected String[] T00343_A438USUREG ;
   protected String[] T00343_A439USUREG ;
   protected String[] T00343_A440USUREG ;
   protected String[] T00343_A430GpUCod ;
   protected String[] T003411_A429USUCOD ;
}

final class tmmusu10__default extends DataStoreHelperBase implements ILocalDataStoreHelper
{
   public Cursor[] getCursors( )
   {
      return new Cursor[] {
          new ForEachCursor("T00342", "SELECT [GpUCod] FROM [MMGUS10] WITH (NOLOCK) WHERE [GpUCod] = ? ",true, GX_NOMASK, false, this,0,false )
         ,new ForEachCursor("T00343", "SELECT [USUCOD], [USUNOM], [USUAUX], [USUCLA], [USUFCH], [USUMAIL], [USUREGEST], [USUREGFCH], [USUREGUSU], [GpUCod] FROM [MMUSU10] WITH (UPDLOCK) WHERE [USUCOD] = ? ",true, GX_NOMASK, false, this,0,false )
         ,new ForEachCursor("T00344", "SELECT [USUCOD], [USUNOM], [USUAUX], [USUCLA], [USUFCH], [USUMAIL], [USUREGEST], [USUREGFCH], [USUREGUSU], [GpUCod] FROM [MMUSU10] WITH (NOLOCK) WHERE [USUCOD] = ? ",true, GX_NOMASK, false, this,0,false )
         ,new ForEachCursor("T00345", "SELECT [USUCOD] FROM [MMUSU10] WITH (FASTFIRSTROW NOLOCK) WHERE [USUCOD] = ? ",true, GX_NOMASK, false, this,0,false )
         ,new ForEachCursor("T00346", "SELECT [USUCOD] FROM [MMUSU10] WITH (FASTFIRSTROW NOLOCK) WHERE ( [USUCOD] > ?) ORDER BY [USUCOD] ",true, GX_NOMASK, false, this,0,false )
         ,new ForEachCursor("T00347", "SELECT [USUCOD] FROM [MMUSU10] WITH (FASTFIRSTROW NOLOCK) WHERE ( [USUCOD] < ?) ORDER BY [USUCOD] DESC ",true, GX_NOMASK, false, this,0,false )
         ,new UpdateCursor("T00348", "INSERT INTO [MMUSU10] ([USUCOD], [USUNOM], [USUAUX], [USUCLA], [USUFCH], [USUMAIL], [USUREGEST], [USUREGFCH], [USUREGUSU], [GpUCod]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", GX_NOMASK)
         ,new UpdateCursor("T00349", "UPDATE [MMUSU10] SET [USUNOM]=?, [USUAUX]=?, [USUCLA]=?, [USUFCH]=?, [USUMAIL]=?, [USUREGEST]=?, [USUREGFCH]=?, [USUREGUSU]=?, [GpUCod]=?  WHERE [USUCOD] = ?", GX_NOMASK)
         ,new UpdateCursor("T003410", "DELETE FROM [MMUSU10]  WHERE [USUCOD] = ?", GX_NOMASK)
         ,new ForEachCursor("T003411", "SELECT [USUCOD] FROM [MMUSU10] WITH (FASTFIRSTROW NOLOCK) ORDER BY [USUCOD] ",true, GX_NOMASK, false, this,0,false )
      };
   }

   public void getResults( int cursor ,
                           IFieldGetter rslt ,
                           Object[] buf ) throws SQLException
   {
      switch ( cursor )
      {
            case 0 :
               ((String[]) buf[0])[0] = rslt.getString(1, 3) ;
               break;
            case 1 :
               ((String[]) buf[0])[0] = rslt.getString(1, 10) ;
               ((String[]) buf[1])[0] = rslt.getString(2, 40) ;
               ((String[]) buf[2])[0] = rslt.getString(3, 64) ;
               ((String[]) buf[3])[0] = rslt.getString(4, 10) ;
               ((String[]) buf[4])[0] = rslt.getString(5, 8) ;
               ((String[]) buf[5])[0] = rslt.getString(6, 40) ;
               ((String[]) buf[6])[0] = rslt.getString(7, 10) ;
               ((String[]) buf[7])[0] = rslt.getString(8, 8) ;
               ((String[]) buf[8])[0] = rslt.getString(9, 10) ;
               ((String[]) buf[9])[0] = rslt.getString(10, 3) ;
               break;
            case 2 :
               ((String[]) buf[0])[0] = rslt.getString(1, 10) ;
               ((String[]) buf[1])[0] = rslt.getString(2, 40) ;
               ((String[]) buf[2])[0] = rslt.getString(3, 64) ;
               ((String[]) buf[3])[0] = rslt.getString(4, 10) ;
               ((String[]) buf[4])[0] = rslt.getString(5, 8) ;
               ((String[]) buf[5])[0] = rslt.getString(6, 40) ;
               ((String[]) buf[6])[0] = rslt.getString(7, 10) ;
               ((String[]) buf[7])[0] = rslt.getString(8, 8) ;
               ((String[]) buf[8])[0] = rslt.getString(9, 10) ;
               ((String[]) buf[9])[0] = rslt.getString(10, 3) ;
               break;
            case 3 :
               ((String[]) buf[0])[0] = rslt.getString(1, 10) ;
               break;
            case 4 :
               ((String[]) buf[0])[0] = rslt.getString(1, 10) ;
               break;
            case 5 :
               ((String[]) buf[0])[0] = rslt.getString(1, 10) ;
               break;
            case 9 :
               ((String[]) buf[0])[0] = rslt.getString(1, 10) ;
               break;
      }
   }

   public void setParameters( int cursor ,
                              IFieldSetter stmt ,
                              Object[] parms ) throws SQLException
   {
      switch ( cursor )
      {
            case 0 :
               stmt.setString(1, (String)parms[0], 3);
               break;
            case 1 :
               stmt.setString(1, (String)parms[0], 10);
               break;
            case 2 :
               stmt.setString(1, (String)parms[0], 10);
               break;
            case 3 :
               stmt.setString(1, (String)parms[0], 10);
               break;
            case 4 :
               stmt.setString(1, (String)parms[0], 10);
               break;
            case 5 :
               stmt.setString(1, (String)parms[0], 10);
               break;
            case 6 :
               stmt.setString(1, (String)parms[0], 10);
               stmt.setString(2, (String)parms[1], 40);
               stmt.setString(3, (String)parms[2], 64);
               stmt.setString(4, (String)parms[3], 10);
               stmt.setString(5, (String)parms[4], 8);
               stmt.setString(6, (String)parms[5], 40);
               stmt.setString(7, (String)parms[6], 10);
               stmt.setString(8, (String)parms[7], 8);
               stmt.setString(9, (String)parms[8], 10);
               stmt.setString(10, (String)parms[9], 3);
               break;
            case 7 :
               stmt.setString(1, (String)parms[0], 40);
               stmt.setString(2, (String)parms[1], 64);
               stmt.setString(3, (String)parms[2], 10);
               stmt.setString(4, (String)parms[3], 8);
               stmt.setString(5, (String)parms[4], 40);
               stmt.setString(6, (String)parms[5], 10);
               stmt.setString(7, (String)parms[6], 8);
               stmt.setString(8, (String)parms[7], 10);
               stmt.setString(9, (String)parms[8], 3);
               stmt.setString(10, (String)parms[9], 10);
               break;
            case 8 :
               stmt.setString(1, (String)parms[0], 10);
               break;
      }
   }

}

